package com.erlang.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping(value = "/multiPath")
public class MultiPathController {

    //@RequestMapping 支持统配符以及ANT风格的路径
    @RequestMapping(value = {"/succeed","succ*","/test/succeed"})
    public ModelAndView succeed(){
        ModelAndView modelAndView = new ModelAndView();
        Map<String,Object> map = new HashMap<>();
        map.put("content", "多路径");
        modelAndView.addAllObjects(map);
        modelAndView.setViewName("succeed");
        return  modelAndView;
    }
}